package com.ym.medical.service;


import com.github.pagehelper.PageInfo;
import com.ym.core.utils.tkmybatis.IBaseSV;
import com.ym.medical.domain.entity.ConsumeDetailsEntity;
import com.ym.medical.domain.param.ConsumeDetailsParam;
import com.ym.medical.domain.param.DocConsumeDetailParam;
import com.ym.medical.domain.param.DoctorConsumeDetailParam;
import com.ym.medical.domain.param.PlatformAccountExampleParam;
import com.ym.medical.domain.vo.ConsumeDetailsVo;
import com.ym.medical.domain.vo.DoctorBillDetailVo;
import com.ym.medical.domain.vo.DoctorConsumeDetailVO;
import com.ym.medical.domain.vo.DoctorTdDetailsVO;
import com.ym.medical.domain.vo.PCconsumeVo;
import com.ym.medical.domain.vo.StudioTransactionVo;
import com.ym.medical.domain.vo.TdDetailSummaryVO;
import com.ym.medical.domain.vo.UserExpendIncomeVO;

import java.util.Date;
import java.util.List;

/**
 * ComputerName:LAPTOP-I6GKDIFQ
 * Author:admin
 * Date: 2019-06-14
 * Time: 13:56:07
 * 仅包含消费/退费交易记录服务接口
 */
public interface IConsumeDetailsSV extends IBaseSV<ConsumeDetailsEntity> {

    /**
     * 患者端-收入支出
     * @param patientId
     * @param tdTime
     * @return
     */
    UserExpendIncomeVO patientExpendIncome(Long patientId, String tdTime);

    /**
     * 医生端-账户收入支出
     * @param doctId
     * @param tdTime
     * @return
     */
    UserExpendIncomeVO doctorExpendIncomeVO(Long doctId, String tdTime);

    /**
     * 患者端-用户的交易明细
     * @param userId
     * @param tdTime
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<DoctorTdDetailsVO> userTransactionDetail(Long userId, String tdTime, int pageNum, int pageSize);

    /**
     * 医生端-账户交易明细
     * @param userId
     * @param tdTime
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<DoctorTdDetailsVO> docTransactionDetail(Long userId, String tdTime, int pageNum, int pageSize);

    /***
     * 患者账户信息
     * @param userId
     * @return
     */
    PCconsumeVo getPatientAccount(Long userId);

    /**
     * 患者交易列表
     * @param pageNo
     * @param limit
     * @param consumeModel
     * @return
     */
    PageInfo<ConsumeDetailsEntity> getConsumeDetails(int pageNo, int limit, ConsumeDetailsParam consumeModel);

    /**
     *
     * @param doctorConsumeDetailVO
     * @param pageNo
     * @param limit
     * @return
     */
    PageInfo<DoctorConsumeDetailVO> listDoctorExpendDetail(DoctorConsumeDetailParam doctorConsumeDetailVO, int pageNo, int limit);

    /**
     * 患者的交易明细
     * @param pageNo
     * @param limit
     * @param consumeDetailsModel
     * @return
     */
    PageInfo<ConsumeDetailsVo> listPatientConsumeDetail(int pageNo, int limit, ConsumeDetailsParam consumeDetailsModel);

    /**
     * PC端-账务系统 平台账户交易汇总
     * @param startTime
     * @param endTime
     * @return
     */
    TdDetailSummaryVO tdDetailSummary(String tdType, Date startTime, Date endTime);


    /**
     * PC端-账务系统-平台账务管理 医生消费收入记录管理
     *  查询该医生的问诊和送心意类型订单的总金额
     * @param platformAccountExampleVO
     * @Link ConsumeDetails (inclode:  accId, tdType(问诊，送心意), tdAmount(用户在该问诊类型下的总金额))
     */
    List<ConsumeDetailsEntity>listDocIncomeRecord(PlatformAccountExampleParam platformAccountExampleVO);

    /**
     * 根据id批量修改
     * @param consumeDetailsModel
     * @param ids
     */
    int updateBatchById(ConsumeDetailsParam consumeDetailsModel,List<Long> ids);

    /**
     * 医生工作室交易汇总
     * @param pageNo
     * @param limit
     * @param detailsModel
     * @return
     */
    PageInfo<StudioTransactionVo> studioTransaction(int pageNo, int limit, ConsumeDetailsParam detailsModel);

    /**
     * 清除系统出账主键
     * @param auditIds
     */
    void clearSysAuditId(Long[] auditIds);

    /**
     * 获取医生账单详情
     * @param docConsumeDetailDTO
     * @return
     */
    List<DoctorBillDetailVo> getDoctorBillDetailVo(DocConsumeDetailParam docConsumeDetailDTO);

}
